#include<bits/stdc++.h>
using namespace std;
namespace IO{
    const int BUF=1<<21;
    char buff[BUF],*p1=buff,*p2=buff;
    #define getchar() (p1==p2&&(p2=((p1=buff)+fread(buff,1,BUF,stdin)),p1==p2)?EOF:*p1++)
    template<typename T>inline void read(T &x){
        char ch=getchar();x=0;int f=1;
        while(!isdigit(ch)){if(ch=='-')f=-1;ch=getchar();}
        while(isdigit(ch)) x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
        x*=f;
    }
    char obuf[BUF],*p3=obuf;
    inline void pc(char ch){
        if(p3-obuf<BUF) *p3++=ch;
        else fwrite(obuf,p3-obuf,1,stdout),p3=obuf,*p3++=ch;
    }
    inline void put(const int *s){while(*s) pc(*s),++s;}
    char ch[32],ctop;
    template<typename T>inline void print(T x){
    	if(x<0) x=~x+1,pc('-');
        if(!x) return pc(48);
        while(x) ch[++ctop]=x%10^48,x/=10;
        while(ctop) pc(ch[ctop--]);
    }
    inline void flush(){fwrite(obuf,p3-obuf,1,stdout);}
}
using namespace IO;
const int N=2e5+5,mod=998244353;
int n,k,f[N],g[N];
vector<int> G[N];
inline void Mod(int &x){return (x>=mod)&&(x-=mod),void();}
struct Tree{
	int mx,tag,val;
	inline Tree operator+(Tree y){
		int s=0;
		if(mx>=y.mx) s=val;
		if(y.mx>=mx) Mod(s+=y.val);
		return (Tree){max(mx,y.mx),0,s};
	}
}t[N<<2];
inline void insert(int p,int v){t[p].tag+=v,t[p].mx+=v;}
inline void pushdown(int p){
	if(t[p].tag){
		insert(2*p,t[p].tag);
		insert(2*p+1,t[p].tag);
		t[p].tag=0;
	} 
}
#define mid ((l+r)>>1)
void build(int p,int l,int r){
	t[p].mx=t[p].tag=0;
	if(l<r){
		build(2*p,l,mid);
		build(2*p+1,mid+1,r);
		t[p]=t[2*p]+t[2*p+1];
	}else t[p].val=g[l-1];
}
void change(int p,int l,int r,int lt,int rt,int v){
	if(lt<=l&&r<=rt) return insert(p,v),void();
	pushdown(p);
	if(lt<=mid) change(2*p,l,mid,lt,rt,v);
	if(mid<rt) change(2*p+1,mid+1,r,lt,rt,v);
	t[p]=t[2*p]+t[2*p+1];
	
}
namespace llll{
	int f[N],g[N];
	inline void dp(){
		f[0]=1;
		while(k--){
			swap(f,g);
			int sum=g[0];
			for(int i=1;i<=n;++i){
				f[i]=sum;
				Mod(sum+=g[i]);
			}
			print(f[n]),pc('\n');
			f[0]=0;
		}
	}
}
int main(){
	freopen("soft.in","r",stdin);
	freopen("soft.out","w",stdout);
	read(n),read(k);
	bool sub=1;
	for(int i=1,u,v;i<n;++i){
		read(u),read(v);
		if(u<v) swap(u,v);
		G[u].push_back(v); 
		sub&=(v==u+1);
	}
	if(sub){
		llll::dp();
		return 0;
	}
	f[0]=1;
	while(k--){
		swap(f,g);
		build(1,1,n);
		for(int i=1;i<=n;++i){
			for(int j:G[i]) change(1,1,n,1,j,1);
			change(1,1,n,i,i,i);
			f[i]=t[1].val;
		}
		f[0]=0;
		print(f[n]),pc('\n'); 
	}
	flush();
	return 0;
}

